<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- 公共head -->
<head th:fragment="head(title, links, scripts)">
 	<base th:href="@{/}">
	<title th:replace="${title}">医惠贷</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="cache-control" content="no-cache" />
	<meta http-equiv="expires" content="0" />
	
    <link rel="shortcut icon" th:href="@{/images/favicon.ico}" type="image/x-icon"/>
    <link rel="stylesheet" th:href="@{/vendors/mdi/css/materialdesignicons.min.css}" />
    <link rel="stylesheet" th:href="@{/css/common.css}" />
    <link rel="stylesheet" th:href="@{/css/formPageComm.css}">
    <link rel="stylesheet" th:href="@{/css/listPageComm.css}">
	<th:block th:replace="${links} ?: ~{}" />
    
    <script type="text/javascript" th:src="@{/common/jquery/1.12.4/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/common/HTMLTurbo/0.4.0/HTMLTurbo.js}"></script>
    <link rel="stylesheet" th:href="@{/common/HTMLTurbo/0.4.0/HTMLTurbo.css}" />

    <!--
    <script th:src="@{/js/sea.js}"></script>
    <script th:src="@{/js/seaConfig.js}"></script>
    -->

    <script>
        var  mcp="/mcp";
    </script>

    <script>
        var baseUrl="/mcp";

        var RuleParser=HTMLTurbo.util.RuleParser;
        var ListPage=HTMLTurbo.page.ListPage;
        var DetailPage=HTMLTurbo.page.DetailPage;
        var FormPage=HTMLTurbo.page.DetailPage;
    </script>
	<!--<script th:replace="${scripts} ?: ~{}" ></script>-->
</head>

<body>
    <!-- 公共header -->
    <header th:fragment="header">
        <ul>
            <li><a href="/view" data-pjax>这是header部分</a></li>
        </ul>
    </header>

    <div th:fragment="pager" id="pagination" class="ht_pagination" th:if="${vo.page.total}" th:object="${vo.page}">
        <ul class="pageList">
            <li class="first"><input type="submit" name="page_counter" th:value="1"></li>
            <li class="prev" th:if="*{pageNum>1}"><input type="submit" name="page_counter" th:value="*{pageNum-1}"></li>
            <li th:if="*{pageNum-6>0}">...</li>

            <li th:each="pageNo : *{#numbers.sequence(pageNum-5, pageNum+5)}" th:if="${pageNo>0 and pageNo<=vo.page.pages}"  th:class="${pageNo == vo.page.pageNum} ? 'current' :'' ">
                <input type="submit" name="page_counter" th:value="${pageNo}" />
            </li>

            <li th:if="*{pageNum+6<=pages}">...</li>
            <li class="next" th:if="*{pageNum+1<=pages}"><input type="submit" name="page_counter" th:value="*{pageNum+1}"></li>
            <li class="last"><input type="submit" name="page_counter" th:value="*{pages}"></li>
        </ul>
        <p>
            <label for="pageNum">跳转到：</label>
            <input type="text" name="pageNum" id="pageNum" size="3" maxlength="9" class="pageNum" th:value="*{pageNum}" required />
            <input type="submit" class="submitButton" value="GO">
            <input type="hidden" name="pageTotal" id="pageTotal" th:value="*{total}">
            <input type="hidden" name="pageSize"  id="pageSize"  th:value="*{pageSize}">
            <span class="tips">当前第 [[*{pageNum}]] 页/总 [[*{pages}]] 页，共有 [[*{total}]] 条信息</span>
        </p>
        <script>
            $("#pagination li [name=page_counter]").on("click",function(event){
                var target=event.currentTarget;
                var value=target.value;
                $("#pageNum").val(value)
            });
        </script>
    </div>

	<th:block th:fragment="loading">
        <div class="ht-masker open"></div>
        <div class="ht-loading open"><div class="wrapper"><p>请稍候</p></div></div>
	</th:block>
	
    <ul th:fragment="errors" id="backAlertMsg" style="display: none;" th:if="${#fields.hasErrors('dto.*')}">
        <li th:each="err:${#fields.errors('dto.*')}" th:text="${err}"></li>
    </ul>

    <!-- 公共footer  -->
    <footer th:fragment="footer">
        <p> 这是 footer 部分 </p>
    </footer>
    
</body>
</html>
